Atom Pub binding now returns an empty unicode string for the repo name if the server does not return a repo name which is consistent with the browser binding. Also change the toString method of repo to use repo ID instead of repo name because not all repos return a name.

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/cmislib/atompub/ b/src/cmislib/atompub/
index a5cc469..f1a629f 100644
--- a/src/cmislib/atompub/
+++ b/src/cmislib/atompub/
@@ -948,7 +948,7 @@
     def __str__(self):
         """To string"""
-        return self.getRepositoryName()
+        return self.getRepositoryId()
     def reload(self):
@@ -1155,7 +1155,11 @@
         if self._repositoryName is None:
             if self.xmlDoc is None:
-            self._repositoryName = self.xmlDoc.getElementsByTagNameNS(CMIS_NS, 'repositoryName')[0]
+            if self.xmlDoc.getElementsByTagNameNS(CMIS_NS, 'repositoryName')[0].firstChild:
+                self._repositoryName = self.xmlDoc.getElementsByTagNameNS(CMIS_NS, 'repositoryName')[0]
+            else:
+                self._repositoryName = u''
         return self._repositoryName
     def getRepositoryInfo(self):