Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2008-09-23 09:44:06 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2008-09-23 09:44:06 (GMT)
commit99983b1bb9468215245d8375295c2e591f337d4d (patch)
tree7ee8d2050c16bbf5f737a5baa26fb5851dac0524
parenta9eb0d9c350dbc4cc0f91aa6e11f2d92c00fa4fa (diff)
Fix external properties
-rw-r--r--src/olpc/datastore/metadatastore.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/olpc/datastore/metadatastore.py b/src/olpc/datastore/metadatastore.py
index 8d682f2..5b607be 100644
--- a/src/olpc/datastore/metadatastore.py
+++ b/src/olpc/datastore/metadatastore.py
@@ -35,14 +35,14 @@ class MetadataStore(object):
metadata_path = os.path.join(dir_path, 'metadata')
metadata = self._decode(metadata_path, properties)
- if not properties or len(properties) != len(metadata):
+ if properties is None or len(properties) != len(metadata):
extra_metadata_dir = os.path.join(dir_path, 'extra_metadata')
if os.path.exists(extra_metadata_dir):
for key in os.listdir(extra_metadata_dir):
if properties is not None and key not in properties:
continue
file_path = os.path.join(extra_metadata_dir, key)
- if not os.path.exists(file_path):
+ if os.path.exists(file_path):
# TODO: This class shouldn't know anything about dbus.
import dbus
metadata[key] = dbus.ByteArray(open(file_path).read())