Commits

Arun Karunagath committed bea46a7

versoin string update & minor change to ip address default

  • Participants
  • Parent commits 7d94db4

Comments (0)

Files changed (2)

File pyga/entities.py

                     ips = meta.get(key, '').split(',')
                     ip = ips[len(ips) - 1].strip()
                     if not utils.is_valid_ip(ip):
-                        ip = None
+                        ip = '' 
                     if utils.is_private_ip(ip):
-                        ip = None
+                        ip = ''
             if ip:
                 self.ip_address = ip
 

File pyga/requests.py

         headers = {}
         headers['Host'] = self.config.endpoint.split('/')[2]
         headers['USER_AGENT'] = self.user_agent
-        headers['X_FORWARDED_FOR'] = self.x_forwarded_for
+        headers['X_FORWARDED_FOR'] = self.x_forwarded_for and  self.x_forwarded_for or ''
 
         if use_post:
             # Don't ask me why "text/plain", but ga.js says so :)
 
     http://code.google.com/apis/analytics/docs/gaJS/changelog.html
     '''
-    VERSION = '5.2.5'  # As of 25.02.2012
+    VERSION = '5.3.0'
     config = Config()
 
     def __init__(self, account_id='', domain_name='', conf=None):