fix img_* -> img-*
authorTero Marttila <terom@fixme.fi>
Tue, 05 May 2009 22:13:49 +0300
changeset 19 0187eddad3eb
parent 18 17e1136cc257
child 20 3feaac71738a
fix img_* -> img-*
index.py
--- a/index.py	Tue May 05 22:07:51 2009 +0300
+++ b/index.py	Tue May 05 22:13:49 2009 +0300
@@ -460,8 +460,8 @@
     Option('sharpness',     False,  FloatOption(),  Defaults.sharpness,     None),
     Option('image-format',  False,  StringOption(), Defaults.img_format,    IMAGE_FORMATS.keys()),
     Option('seed',          False,  IntOption(),    None,                   None),
-    Option('img_width',     False,  IntOption(),    None,                   None),
-    Option('img_height',    False,  IntOption(),    None,                   None),
+    Option('img-width',     False,  IntOption(),    None,                   None),
+    Option('img-height',    False,  IntOption(),    None,                   None),
 )
 
 def handle_generic (req, img_size=None) :
@@ -478,10 +478,10 @@
     if opts['seed'] is None :
         opts['seed'] = time.time()
 
-    if opts['img_width'] and opts['img_height'] :
-        img_size = (opts['img_width'], opts['img_height'])
+    if opts['img-width'] and opts['img-height'] :
+        img_size = (opts['img-width'], opts['img-height'])
 
-        if opts['img_width'] > IMG_SIZE_MAX or opts['img_height'] > IMG_SIZE_MAX :
+        if opts['img-width'] > IMG_SIZE_MAX or opts['img-height'] > IMG_SIZE_MAX :
             raise ValueError(img_size)
     
     # load/prep resources