climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1562287 - /incubator/climate/trunk/ocw-ui/backend/local_file_metadata_extractors.py
Date Tue, 28 Jan 2014 22:21:29 GMT
Author: joyce
Date: Tue Jan 28 22:21:29 2014
New Revision: 1562287

URL: http://svn.apache.org/r1562287
Log:
CLIMATE-326 - Minor LFME cleanup

Modified:
    incubator/climate/trunk/ocw-ui/backend/local_file_metadata_extractors.py

Modified: incubator/climate/trunk/ocw-ui/backend/local_file_metadata_extractors.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/local_file_metadata_extractors.py?rev=1562287&r1=1562286&r2=1562287&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/backend/local_file_metadata_extractors.py (original)
+++ incubator/climate/trunk/ocw-ui/backend/local_file_metadata_extractors.py Tue Jan 28 22:21:29
2014
@@ -111,17 +111,12 @@ def list_latlon(file_path):
         values = [success, lat_name, lon_name, lat_min, lat_max, lon_min, lon_max]
         value_names = ['success', 'lat_name', 'lon_name', 'lat_min', 'lat_max', 'lon_min',
'lon_max']
         output = dict(zip(value_names, values))
-
-        if request.query.callback:
-            return "%s(%s)" % (request.query.callback, output)
-        return output
-
     else:
-        output = {"success": success, "variables": var_names_list}
+        output = {'success': success, 'variables': var_names_list}
 
-        if request.query.callback:
-            return "%s(%s)" % (request.query.callback, output)
-        return output
+    if request.query.callback:
+        return '%s(%s)' % (request.query.callback, output)
+    return output
 
 @lfme_app.route('/list_time/<file_path:path>')
 def list_latlon(file_path):
@@ -178,14 +173,9 @@ def list_latlon(file_path):
             'start_time': start_time,
             'end_time': end_time
         }
-
-        if request.query.callback:
-            return "%s(%s)" % (request.query.callback, output)
-        return output
-
     else:
-        output = {"success": False, "variables": var_names_list}
+        output = {'success': False, 'variables': var_names_list}
 
-        if request.query.callback:
-            return "%s(%s)" % (request.query.callback, output)
-        return output
+    if request.query.callback:
+        return '%s(%s)' % (request.query.callback, output)
+    return output



Mime
View raw message