Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- usr/share/pyshared/crm/cibconfig.py 2011-08-26 04:10:10.000000000 -0400
- +++ /usr/share/pyshared/crm/cibconfig.py 2011-12-05 09:44:45.027651238 -0500
- @@ -128,6 +128,7 @@
- except IOError, msg:
- common_err(msg)
- break
- + s += "\n# vim: set filetype=.pcmk :\n"
- s = ''.join(f)
- f.close()
- if hash(s) == filehash: # file unchanged
- --- usr/share/pyshared/crm/utils.py 2011-08-26 04:10:10.000000000 -0400
- +++ /usr/share/pyshared/crm/utils.py 2011-12-05 09:49:25.261687207 -0500
- @@ -168,7 +168,7 @@
- Write the given string to a temporary file. Return the name
- of the file.
- '''
- - fd,tmp = mkstemp()
- + fd,tmp = mkstemp(suffix=".pcmk")
- try: f = os.fdopen(fd,"w")
- except IOError, msg:
- common_err(msg)
- @@ -327,7 +327,10 @@
- return
- if not user_prefs.editor:
- return
- - return ext_cmd("%s %s" % (user_prefs.editor,fname))
- + if user_prefs.editor == "vim" or user_prefs.editor == "vi":
- + return ext_cmd("%s %s -u /usr/share/vim/vim72/syntax/pcmk.vim" % (user_prefs.editor,fname))
- + else:
- + return ext_cmd("%s %s" % (user_prefs.editor,fname))
- def page_string(s):
- 'Write string through a pager.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement