diff --git a/bin/packages/Paste.py b/bin/packages/Paste.py index 1d59f917..795cfd22 100755 --- a/bin/packages/Paste.py +++ b/bin/packages/Paste.py @@ -56,6 +56,11 @@ class Paste(object): self.p_size = round(os.path.getsize(self.p_path)/1024.0,2) + self.cache = redis.StrictRedis( + host = cfg.get("Redis_Queues", "host"), + port = cfg.getint("Redis_Queues", "port"), + db = cfg.getint("Redis_Queues", "db")) + self.p_mime = magic.from_buffer(self.get_p_content(), mime = True) self.p_encoding = None @@ -76,11 +81,6 @@ class Paste(object): self.p_source = var[-5] - self.cache = redis.StrictRedis( - host = cfg.get("Redis_Queues", "host"), - port = cfg.getint("Redis_Queues", "port"), - db = cfg.getint("Redis_Queues", "db")) - def get_p_content(self): """