Permalink
Browse files

Slight update, basically fixed possible ImportErrors.

  • Loading branch information...
sysr-q committed Feb 6, 2013
1 parent 88c1aae commit ee3f288a32c1885911af70665bd47613262216e2
Showing with 30 additions and 24 deletions.
  1. +28 −23 chru/version.py
  2. +1 −1 docs/conf.py
  3. +1 −0 setup.py
View
@@ -1,26 +1,31 @@
-__version__ = "2.1.0"
-__supported__ = ["2.1.0rc1", "2.1.0"]
+__version__ = "2.1.1"
+__supported__ = ["2.1.0rc1", "2.1.0", "2.1.1"]
-import requests.structures
+codes = None
-_codes = {
- -1:("not_post",),
- 0: ("ok", "good", "success",),
- 1: ("api_disabled", "disabled",),
- 2: ("captcha_incorrect",),
- 3: ("url_too_long",),
- 4: ("url_invalid",),
- 5: ("custom_url_invalid",),
- 6: ("partial_form_data",),
- 7: ("no_such_key",),
- 8: ("no_such_url",),
- 9: ("deletion_invalid",),
- 10:("deletion_failed",)
-}
+try:
+ import requests.structures
-codes = requests.structures.LookupDict(name="reply_codes")
-for (code, titles) in list(_codes.items()):
- for title in titles:
- setattr(codes, title, code)
- if not title.startswith('\\'):
- setattr(codes, title.upper(), code)
+ _codes = {
+ -1:("not_post",),
+ 0: ("ok", "good", "success",),
+ 1: ("api_disabled", "disabled",),
+ 2: ("captcha_incorrect",),
+ 3: ("url_too_long",),
+ 4: ("url_invalid",),
+ 5: ("custom_url_invalid",),
+ 6: ("partial_form_data",),
+ 7: ("no_such_key",),
+ 8: ("no_such_url",),
+ 9: ("deletion_invalid",),
+ 10:("deletion_failed",)
+ }
+
+ codes = requests.structures.LookupDict(name="reply_codes")
+ for (code, titles) in list(_codes.items()):
+ for title in titles:
+ setattr(codes, title, code)
+ if not title.startswith('\\'):
+ setattr(codes, title.upper(), code)
+except ImportError:
+ pass
View
@@ -50,7 +50,7 @@
# The short X.Y version.
version = '2.1'
# The full version, including alpha/beta/rc tags.
-release = '2.1.0'
+release = '2.1.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
View
@@ -22,6 +22,7 @@ def long_desc():
"packages": [
'chru',
'chru.api',
+ 'chru.api.web',
'chru.web',
'chru.utility',
],

0 comments on commit ee3f288

Please sign in to comment.