CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/05/10 08:29:09

Modified files:
        .              : ChangeLog 
        scripts        : lilypond-pdfpc-helper.py 

Log message:
        (ly_pc_editor): robustness.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3585&tr2=1.3586&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scripts/lilypond-pdfpc-helper.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3585 lilypond/ChangeLog:1.3586
--- lilypond/ChangeLog:1.3585   Tue May 10 07:29:38 2005
+++ lilypond/ChangeLog  Tue May 10 08:29:09 2005
@@ -1,3 +1,7 @@
+2005-05-10  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
+
+       * scripts/lilypond-pdfpc-helper.py (ly_pc_editor): robustness.
+
 2005-05-10  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
 
        * scm/backend-library.scm (postscript->pdf): Invoke gs instead of
Index: lilypond/scripts/lilypond-pdfpc-helper.py
diff -u lilypond/scripts/lilypond-pdfpc-helper.py:1.3 
lilypond/scripts/lilypond-pdfpc-helper.py:1.4
--- lilypond/scripts/lilypond-pdfpc-helper.py:1.3       Mon Feb 28 12:11:50 2005
+++ lilypond/scripts/lilypond-pdfpc-helper.py   Tue May 10 08:29:09 2005
@@ -75,7 +75,12 @@
 
 (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 @@
        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)


_______________________________________________
Lilypond-cvs mailing list
Lilypond-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to