Avoid using global variable that wasn't intended to be global
authorMagnus Hagander <magnus@hagander.net>
Thu, 13 Jun 2013 11:50:31 +0000 (13:50 +0200)
committerMagnus Hagander <magnus@hagander.net>
Thu, 13 Jun 2013 11:50:31 +0000 (13:50 +0200)
synctwitter.py

index 230f8776dc8728c262b1dcd81931c56fef5b909b..206e94ea126fbe1ebb0ab01ba85e973e65b8192b 100755 (executable)
@@ -18,7 +18,7 @@ class SyncTwitter(TwitterClient):
                TwitterClient.__init__(self, cfg)
 
                psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
-               self.db = psycopg2.connect(c.get('planet','db'))
+               self.db = psycopg2.connect(cfg.get('planet','db'))
 
        def Run(self):
                # Get list of handles that should be on the list