Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Update update.py #79

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .idea/dev071.iml

This file was deleted.

2 changes: 1 addition & 1 deletion config/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
author = "vFeed IO"
twitter = "@vfeed_io"
repository = "https://vfeed.io"
build = "0.7.1"
build = "0.7.2"

# Automated update Information
dropbox_dl = " INSERT YOUR DB LINK HERE"
Expand Down
11 changes: 7 additions & 4 deletions lib/core/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

import os
import sys
import urllib2
try:
import urllib2
except ImportError:
import urllib.request as urllib2
import tarfile

from lib.common.utils import checksum
Expand Down Expand Up @@ -59,7 +62,7 @@ def download(self, url, filename):
self.u = urllib2.urlopen(url)
self.f = open(self.filename, 'wb')
self.meta = self.u.info()
self.filesize = int(self.meta.getheaders("Content-Length")[0])
self.filesize = int(self.meta.get("Content-Length"))
self.filesize_dl = 0
self.block_sz = 8192
while True:
Expand Down Expand Up @@ -89,7 +92,7 @@ def uncompress(self):
try:
self.tar = tarfile.open(self.db_compressed, 'r:gz')
self.tar.extractall('.')
except Exception, e:
except Exception as e:
print("[!] Database not extracted ", e)

def check_status(self):
Expand Down Expand Up @@ -122,7 +125,7 @@ def clean(self):
os.remove(self.db_compressed)
if os.path.isfile(self.db_update):
os.remove(self.db_update)
except Exception, e:
except Exception as e:
print("[+] Already cleaned", e)

def check_drobpox_lnk(self):
Expand Down