aboutsummaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorMartijn Kaijser <machine.sanctum@gmail.com>2013-09-30 15:19:24 -0700
committerMartijn Kaijser <machine.sanctum@gmail.com>2013-09-30 15:19:24 -0700
commit0faf8f000f392b14332bb6a05e5cb1c5a6694ed3 (patch)
treee44426a6dc13bd161a95cd6597f9c2b31e2140b4 /addons
parente6111b08e6a49115bbe1534b61eedb6138a65dbd (diff)
parent6d88bc0eceeff3ee5425f2530be7a800f9af1332 (diff)
Merge pull request #3315 from MartijnKaijser/remove_addon
[addons] remove unused sqlite dummy module
Diffstat (limited to 'addons')
-rw-r--r--addons/script.module.pysqlite/addon.xml14
-rw-r--r--addons/script.module.pysqlite/lib/pysqlite2/__init__.py37
2 files changed, 0 insertions, 51 deletions
diff --git a/addons/script.module.pysqlite/addon.xml b/addons/script.module.pysqlite/addon.xml
deleted file mode 100644
index 8b76f6694f..0000000000
--- a/addons/script.module.pysqlite/addon.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.module.pysqlite"
- name="Python SQLite library hook"
- version="2.5.6"
- provider-name="Gerhard Haering">
- <requires>
- <import addon="xbmc.python" version="2.0.0"/>
- </requires>
- <extension point="xbmc.python.module"
- library="lib" />
- <extension point="xbmc.addon.metadata">
- <platform>all</platform>
- </extension>
-</addon>
diff --git a/addons/script.module.pysqlite/lib/pysqlite2/__init__.py b/addons/script.module.pysqlite/lib/pysqlite2/__init__.py
deleted file mode 100644
index 94d26e6694..0000000000
--- a/addons/script.module.pysqlite/lib/pysqlite2/__init__.py
+++ /dev/null
@@ -1,37 +0,0 @@
-
-# if we got here then someone tried to import pysqlite.dbapi2
-# this will only be allowed if the script is greater that version 1.0
-
-import warnings
-import re
-
-# Credit gnud on stackoverflow:
-# see http://stackoverflow.com/questions/1714027/version-number-comparison/1714190#1714190
-def xbmcVerCmp(version1, version2):
- def normalize(v):
- return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")]
- return cmp(normalize(version1), normalize(version2))
-
-# Not sure why this might fail but ....
-try:
- import __main__
- xbmcapiversion = __main__.__xbmcapiversion__
-except:
- xbmcapiversion = "1.0"
- warnings.warn("For some reason the module '" + str(__name__) + "' couldn't get access to '__main__'. This may prevent certain backward compatility modes from operating correctly.")
-
-# if the xbmcapiversion is either not set (because trying to get it failed or
-# the script was invoked in an odd manner from xbmc) ...
-if (xbmcVerCmp(xbmcapiversion,"1.0") <= 0):
- # then import sqlite3 in place of dbapi2
- try:
- import sqlite3 as dbapi2
- except Exception, e:
- warnings.warn("Unable to import sqlite3. This probably means you're on a version of python prior to 2.5 and trying to run an old script.")
- raise e
-
- # ask politely :)
- warnings.warn("DeprecationWarning: the pysqlite2 module is deprecated; please change your script to use sqlite3.")
-else:
- raise DeprecationWarning("You cannot use pysqlite2 while depending on version " + str(xbmcapiversion) + " of the xbmc.python api. Please use sqlite3 instead.")
-