浏览代码

Small bugfixes

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60733 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 11 年之前
父节点
当前提交
679cb79a23

+ 1 - 1
lib/python/temporal/abstract_space_time_dataset.py

@@ -1775,7 +1775,7 @@ class AbstractSpaceTimeDataset(AbstractDataset):
 
 
         date_list.append((start, end))
         date_list.append((start, end))
 
 
-        self. _update_map_timestamps(maps, date_list, dbif)
+        self._update_map_timestamps(maps, date_list, dbif)
 
 
         if connected:
         if connected:
             dbif.close()
             dbif.close()

+ 5 - 2
lib/python/temporal/register.py

@@ -30,7 +30,7 @@ from open_stds import *
 def register_maps_in_space_time_dataset(
 def register_maps_in_space_time_dataset(
     type, name, maps=None, file=None, start=None,
     type, name, maps=None, file=None, start=None,
     end=None, unit=None, increment=None, dbif=None,
     end=None, unit=None, increment=None, dbif=None,
-        interval=False, fs="|"):
+        interval=False, fs="|", update_cmd_list=True):
     """!Use this method to register maps in space time datasets.
     """!Use this method to register maps in space time datasets.
 
 
        Additionally a start time string and an increment string can be
        Additionally a start time string and an increment string can be
@@ -60,6 +60,8 @@ def register_maps_in_space_time_dataset(
        @param interval If True, time intervals are created in case the start
        @param interval If True, time intervals are created in case the start
                        time and an increment is provided
                        time and an increment is provided
        @param fs Field separator used in input file
        @param fs Field separator used in input file
+       @param update_cmd_list If is True, the command that was invoking this process
+                              will be written to the process history
     """
     """
     start_time_in_file = False
     start_time_in_file = False
     end_time_in_file = False
     end_time_in_file = False
@@ -318,7 +320,8 @@ def register_maps_in_space_time_dataset(
     if name and map_object_list:
     if name and map_object_list:
         msgr.message(_("Update space time raster dataset"))
         msgr.message(_("Update space time raster dataset"))
         sp.update_from_registered_maps(dbif)
         sp.update_from_registered_maps(dbif)
-        sp.update_command_string(dbif=dbif)
+        if update_cmd_list is True:
+            sp.update_command_string(dbif=dbif)
 
 
     # Update affected datasets
     # Update affected datasets
     if datatsets_to_modify:
     if datatsets_to_modify:

+ 2 - 1
lib/python/temporal/stds_import.py

@@ -442,7 +442,8 @@ def import_stds(input, output, extrdir, title=None, descr=None, location=None,
         register_maps_in_space_time_dataset(
         register_maps_in_space_time_dataset(
             type=sp.get_new_map_instance(None).get_type(),
             type=sp.get_new_map_instance(None).get_type(),
             name=output, file=new_list_file_name, start="file",
             name=output, file=new_list_file_name, start="file",
-            end="file", unit=relative_time_unit, dbif=None, fs=fs)
+            end="file", unit=relative_time_unit, dbif=None, fs=fs,
+            update_cmd_list=False)
 
 
         os.chdir(old_cwd)
         os.chdir(old_cwd)
     except:
     except: