server/sources/datafeed.py
changeset 7910 e5d5609e3bf1
parent 7731 48e78934a4e2
child 7931 60068dc83457
--- a/server/sources/datafeed.py	Tue Oct 04 12:23:52 2011 +0200
+++ b/server/sources/datafeed.py	Tue Oct 04 18:45:38 2011 +0200
@@ -82,9 +82,11 @@
         source_entity.complete()
         self.parser_id = source_entity.parser
         self.latest_retrieval = source_entity.latest_retrieval
-        self.urls = [url.strip() for url in source_entity.url.splitlines()
-                     if url.strip()]
-
+        if source_entity.url:
+            self.urls = [url.strip() for url in source_entity.url.splitlines()
+                         if url.strip()]
+        else:
+            self.urls = []
     def update_config(self, source_entity, typedconfig):
         """update configuration from source entity. `typedconfig` is config
         properly typed with defaults set