[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ff-cvs] alph/alph/util dscutil.py
From: |
Asko Soukka |
Subject: |
[ff-cvs] alph/alph/util dscutil.py |
Date: |
Thu, 28 Aug 2003 07:37:19 -0400 |
CVSROOT: /cvsroot/alph
Module name: alph
Branch:
Changes by: Asko Soukka <address@hidden> 03/08/28 07:37:19
Modified files:
alph/util : dscutil.py
Log message:
conditionaling debug output
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/alph/alph/alph/util/dscutil.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
Patches:
Index: alph/alph/util/dscutil.py
diff -u alph/alph/util/dscutil.py:1.7 alph/alph/util/dscutil.py:1.8
--- alph/alph/util/dscutil.py:1.7 Sun Aug 17 12:48:01 2003
+++ alph/alph/util/dscutil.py Thu Aug 28 07:37:19 2003
@@ -112,7 +112,7 @@
documentmedia = [l for l in lines if l.startswith("%%DocumentMedia:")]
if len(documentmedia) == 0:
documentmedia=['%%DocumentMedia: A4 595 842 0 () ()']
- p('No DocumentMedia found: using defaults.')
+ if dbg: p('No DocumentMedia found: using defaults.')
assert len(documentmedia) == 1
media = _dsctokens(documentmedia[0][16:])
assert len(media) % 6 == 0
@@ -157,10 +157,10 @@
for page in pages:
if not hasattr(p, 'media'):
- p('No PageMedia found: using "%s".' % (mtypes.keys()[0]))
+ if dbg: p('No PageMedia found: using "%s".' % (mtypes.keys()[0]))
page.media = mtypes.keys()[0]
if not hasattr(p, 'orientation'):
- p('No PageOrientation found: using "portrait".')
+ if dbg: p('No PageOrientation found: using "portrait".')
page.orientation = 'portrait'
pagemedias = [ mtypes[page.media] for page in pages ]