Advertisement
Guest User

Untitled

a guest
Dec 5th, 2011
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.28 KB | None | 0 0
  1. --- usr/share/pyshared/crm/cibconfig.py 2011-08-26 04:10:10.000000000 -0400
  2. +++ /usr/share/pyshared/crm/cibconfig.py        2011-12-05 09:44:45.027651238 -0500
  3. @@ -128,6 +128,7 @@
  4.              except IOError, msg:
  5.                  common_err(msg)
  6.                  break
  7. +            s += "\n# vim: set filetype=.pcmk :\n"
  8.              s = ''.join(f)
  9.              f.close()
  10.              if hash(s) == filehash: # file unchanged
  11.  
  12. --- usr/share/pyshared/crm/utils.py     2011-08-26 04:10:10.000000000 -0400
  13. +++ /usr/share/pyshared/crm/utils.py    2011-12-05 09:49:25.261687207 -0500
  14. @@ -168,7 +168,7 @@
  15.      Write the given string to a temporary file. Return the name
  16.      of the file.
  17.      '''
  18. -    fd,tmp = mkstemp()
  19. +    fd,tmp = mkstemp(suffix=".pcmk")
  20.      try: f = os.fdopen(fd,"w")
  21.      except IOError, msg:
  22.          common_err(msg)
  23. @@ -327,7 +327,10 @@
  24.          return
  25.      if not user_prefs.editor:
  26.          return
  27. -    return ext_cmd("%s %s" % (user_prefs.editor,fname))
  28. +    if user_prefs.editor == "vim" or user_prefs.editor == "vi":
  29. +        return ext_cmd("%s %s -u /usr/share/vim/vim72/syntax/pcmk.vim" % (user_prefs.editor,fname))
  30. +    else:
  31. +        return ext_cmd("%s %s" % (user_prefs.editor,fname))
  32.  
  33.  def page_string(s):
  34.      'Write string through a pager.'
  35.  
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement