~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add EditorException to stgit/utils.py
[stgit]
/
stgit
/
utils.py
diff --git
a/stgit/utils.py
b/stgit/utils.py
index
d7d4777
..
bfe7797
100644
(file)
--- a/
stgit/utils.py
+++ b/
stgit/utils.py
@@
-154,6
+154,9
@@
def rename(basedir, file1, file2):
os.rename(os.path.join(basedir, file1), full_file2)
remove_dirs(basedir, os.path.dirname(file1))
os.rename(os.path.join(basedir, file1), full_file2)
remove_dirs(basedir, os.path.dirname(file1))
+class EditorException(Exception):
+ pass
+
def call_editor(filename):
"""Run the editor on the specified filename."""
def call_editor(filename):
"""Run the editor on the specified filename."""
@@
-171,5
+174,5
@@
def call_editor(filename):
sys.stdout.flush()
err = os.system(editor)
if err:
sys.stdout.flush()
err = os.system(editor)
if err:
- raise Exception, 'editor failed, exit code: %d' % err
+ raise E
ditorE
xception, 'editor failed, exit code: %d' % err
print 'done'
print 'done'