Skip to content

Commit

Permalink
* exception handle
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintin committed Jan 26, 2016
1 parent e279cc9 commit 9de7486
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion andle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import andle.android
import andle.sdk

VERSION = "1.5.2"
__version__ = "1.5.3"


def update(path, dryrun, remote, gradle):
Expand Down
6 changes: 3 additions & 3 deletions andle/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

try:
from urllib.request import urlopen
from urllib.error import HTTPError
except ImportError:
from urllib2 import urlopen, HTTPError
from urllib2 import urlopen


def request(url):
try:
return urlopen(url)
except HTTPError:
except Exception:
print("fail to connect url: " + url)
return None
2 changes: 1 addition & 1 deletion bin/andle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ UPDATE = "update"
SETSDK = "setsdk"

parser = argparse.ArgumentParser(description="android gradle file update")
parser.add_argument("-v", "--version", action="version", version="%(prog)s " + andle.VERSION)
parser.add_argument("-v", "--version", action="version", version="%(prog)s " + andle.__version__)

subparsers = parser.add_subparsers(dest="sub_command")

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env python

import andle
from setuptools import setup

setup(name='andle',
version='1.5.2',
version=andle.__version__,
description='android dependency sync tool',
long_description='andle is a command line tool to help you sync dependencies, sdk or build tool version in gradle base Android projects.',
keywords='android gradle config build version dependency sync',
Expand Down

0 comments on commit 9de7486

Please sign in to comment.