mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-05 08:46:20 +01:00
Removed checking internet connection
This commit is contained in:
parent
c13fd993b0
commit
63a7b1a449
2 changed files with 0 additions and 18 deletions
|
@ -2,9 +2,6 @@
|
|||
Fixed: TypeError: stat() argument 1 must be encoded string without null bytes,
|
||||
not str #100
|
||||
|
||||
Added:
|
||||
- Checkng for the internet connection before downloading files
|
||||
|
||||
3.2.9 - 24/09/2017
|
||||
Fixed:
|
||||
- Strange dependency problem #97
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
|
||||
import os
|
||||
import urllib2
|
||||
import tarfile
|
||||
import subprocess
|
||||
|
||||
|
@ -46,7 +45,6 @@ class Download(object):
|
|||
self.dir_prefix = ""
|
||||
self.downder = self.meta.downder
|
||||
self.downder_options = self.meta.downder_options
|
||||
self._internet_check()
|
||||
|
||||
def start(self):
|
||||
"""Download files using wget or other downloader.
|
||||
|
@ -122,16 +120,3 @@ class Download(object):
|
|||
self.downder_options += certificate
|
||||
if not self.msg.answer() in ["y", "Y"]:
|
||||
raise SystemExit()
|
||||
|
||||
def _internet_check(self):
|
||||
"""Check for internet connection
|
||||
"""
|
||||
url = "".join(self.url)
|
||||
try:
|
||||
f = urllib2.urlopen(url)
|
||||
return f.read()
|
||||
except (urllib2.URLError, ValueError):
|
||||
print("\n{0}slpkg: Error: unable to resolve the internet connection"
|
||||
"{1}\n".format(self.meta.color["RED"],
|
||||
self.meta.color["ENDC"]))
|
||||
raise SystemExit()
|
||||
|
|
Loading…
Add table
Reference in a new issue