]> git.donarmstrong.com Git - lilypond.git/commitdiff
(ly_pc_editor): robustness.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 10 May 2005 08:29:09 +0000 (08:29 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 10 May 2005 08:29:09 +0000 (08:29 +0000)
ChangeLog
scripts/lilypond-pdfpc-helper.py

index abb2e764ecf7b9b9a3ce5125ac978ffdc536f3e1..3c44eb15c1012df7c9f66407c4a1932b6b2d051f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-05-10  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * scripts/lilypond-pdfpc-helper.py (ly_pc_editor): robustness.
+
 2005-05-10  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/backend-library.scm (postscript->pdf): Invoke gs instead of
index 25a72591077736dced7f9907d6ec10c5d2866962..cfd086fe2fac259be428994a3e861c59b4f503ef 100644 (file)
@@ -75,7 +75,12 @@ if not match:
 
 (file, line, column) = tuple (match.groups())
 
-editor = os.environ['EDITOR']
+
+editor = ''
+try:
+       editor = os.environ['EDITOR']
+except KeyError:
+       pass
 ly_pc_editor = None
 try:
        ly_pc_editor = os.environ['LYEDITOR']
@@ -91,6 +96,10 @@ if ly_pc_editor == None:
        elif re.search ('nedit', editor):
                ly_pc_editor = 'nc -noask +%(line)s %(file)s'
 
+if not ly_pc_editor:
+       sys.stderr.write ("Need to set EDITOR or LYEDITOR")
+       sys.exit (1)
+
 command = ly_pc_editor % vars()
 
 print 'invoked with %s\ncalling %s\n' % (string.join (sys.argv),command)