changeset 572:51800c42bcda

deal with empty repositoryType
author casties
date Mon, 15 Oct 2012 13:03:37 +0200
parents f1906951be2a
children 3b53975be0c8
files MpdlXmlTextServer.py MpiwgXmlTextServer.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MpdlXmlTextServer.py	Fri Oct 12 17:02:40 2012 +0200
+++ b/MpdlXmlTextServer.py	Mon Oct 15 13:03:37 2012 +0200
@@ -55,7 +55,7 @@
 
     def getRepositoryType(self):
         """returns the repository type, e.g. 'production'"""
-        return self.repositoryType
+        return getattr(self, 'repositoryType', None)
 
     def getTextDownloadUrl(self, type='xml', docinfo=None):
         """returns a URL to download the current text"""
--- a/MpiwgXmlTextServer.py	Fri Oct 12 17:02:40 2012 +0200
+++ b/MpiwgXmlTextServer.py	Mon Oct 15 13:03:37 2012 +0200
@@ -55,7 +55,7 @@
 
     def getRepositoryType(self):
         """returns the repository type, e.g. 'production'"""
-        return self.repositoryType
+        return getattr(self, 'repositoryType', None)
 
     def getTextDownloadUrl(self, type='xml', docinfo=None):
         """returns a URL to download the current text"""