Ciaran Farrell avatar Ciaran Farrell committed ec46721

Yet more bugs with upper an dlowercase stuff

Comments (0)

Files changed (2)

               bs = gw.getBusyTimeRequestId(udict)
             except Exception,e:
-              print e
+              logger.error(str(e))
                 bt = gw.getBusyTimes(bs)
               except Exception,e:
+                logger.error(str(e))
                 f = "%Y-%m-%d %H:%M"
     resp = self.client.service.startFreeBusySessionRequest(users=free_busy_list,
     if int(resp.status.code)==0:
+      logger.debug('getBusyTimeRequestId SOAP response was 0 -returning id')
       return int(resp.freeBusySessionId)
+      logger.debug(resp.status.description)
       raise GWFatalException,resp.status.description
   def __parseBusyBlocks__(self,udict):
     FilterGroup.op = 'or'
     u = {}
     for user in users:
-      user1 = user.split('@')[0].lower()
-      u[user1] = {'uuid':None}
+      user1 = user.split('@')[0]
+      u[user1.lower()] = {'uuid':None}
       FilterEntry = self.client.factory.create('ns2:FilterEntry')
       FilterEntry.field = 'username'
       FilterEntry.value = user
             displayName = ''
           uuid = item.uuid
-          if u.has_key(uname.lower()):
-            u[uname.lower()]['email'] = email
-            u[uname.lower()]['uuid'] = uuid
-            u[uname.lower()]['displayName'] = displayName
+          uname_l = uname.lower()
+          if uname_l in u.keys():
+              u[uname_l]['email'] = email
+              u[uname_l]['uuid'] = uuid
+              u[uname_l]['displayName'] = displayName
-            print "looking for %s in %s"%(uname,u)
             logger.warn('%s was found on the Groupwise server but was not requested'%uname)
           logger.warn('No uuid known for user with id %s'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.