android exec fix
parent
7985cab656
commit
3495306859
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="script.module.torrent2http" name="torrent2http" version="0.1.2" provider-name="anteo">
|
||||
<addon id="script.module.torrent2http" name="torrent2http" version="0.1.3" provider-name="anteo">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.14.0"/>
|
||||
</requires>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
[B]Version 0.1.3[/B]
|
||||
+ Android execute fix
|
||||
|
||||
[B]Version 0.1.2[/B]
|
||||
+ Torrent2http binaries for Raspberry Pi v1 (arm v6)
|
||||
|
||||
|
|
|
@ -30,8 +30,12 @@ class Engine:
|
|||
def _ensure_binary_executable(self, path):
|
||||
st = os.stat(path)
|
||||
if not st.st_mode & stat.S_IEXEC:
|
||||
self._log("%s is not executable, trying to change its mode..." % path)
|
||||
os.chmod(path, st.st_mode | stat.S_IEXEC)
|
||||
try:
|
||||
self._log("%s is not executable, trying to change its mode..." % path)
|
||||
os.chmod(path, st.st_mode | stat.S_IEXEC)
|
||||
except Exception, e:
|
||||
self._log("Failed! Exception: %s" % str(e))
|
||||
return False
|
||||
st = os.stat(path)
|
||||
if st.st_mode & stat.S_IEXEC:
|
||||
self._log("Succeeded")
|
||||
|
@ -63,8 +67,6 @@ class Engine:
|
|||
if not success:
|
||||
raise Error("Can't find torrent2http or download binary for %s" % self.platform,
|
||||
Error.UNKNOWN_PLATFORM, platform=str(self.platform))
|
||||
else:
|
||||
lm.update()
|
||||
|
||||
if not self._ensure_binary_executable(binary_path):
|
||||
if self.platform.system == "android":
|
||||
|
|
Loading…
Reference in New Issue