Commits

Chris Mutel  committed 1233b5f

bw2package.export_obj uses obj.filename, not obj.name, which is not safe for filenames

  • Participants
  • Parent commits be486fd

Comments (0)

Files changed (2)

 Changelog
 *********
 
-0.13.1 (2014-XX-XX)
+0.14 (2014-XX-XX)
 ===================
 
+**bw2-uptodate.py is required for this update**
+
+- CHANGE: ``BW2Package.export_obj`` now uses ``obj.filename`` instead of ``obj.name`` for filepath of backup file (needed for LCIA methods).
 - CHANGE: ``categories`` is no longer required by ``utils.activity_hash``.
 - CHANGE: ``Database.copy()`` no longer emits a not registered warning.
 - CHANGE: ``Database.copy()`` makes a deep copy of data before modification.

File bw2data/io/bw2package.py

 
         """
         if filename is None:
-            filename = obj.name
+            filename = obj.filename
         filepath = os.path.join(
             config.request_dir(folder),
             filename + u".bw2package"