Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/1.6.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDoee committed Oct 11, 2016
2 parents 8e2010f + 2468ab2 commit c2cc369
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 19 deletions.
Binary file removed .coverage
Binary file not shown.
3 changes: 2 additions & 1 deletion .coveragerc
Expand Up @@ -5,6 +5,7 @@ omit =
include =
*/autotorrent/*

[report]
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
pragma: no cover
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -25,3 +25,4 @@ _trial_temp
docs/_build*
.env*
autotorrent.conf
.coverage
5 changes: 5 additions & 0 deletions CHANGELOG.rst
@@ -1,3 +1,8 @@
Version 1.6.2 (11-10-2016)
===========================================================

* Bugfix: Fixed automatic typecasting bug on 32-bit Python2 / architectures.

Version 1.6.1 (11-05-2016)
===========================================================

Expand Down
22 changes: 20 additions & 2 deletions README.rst
Expand Up @@ -16,6 +16,24 @@ Requirements
- Python 2.6, 2.7, 3.3, 3.4
- Shell / SSH / Putty

Status
------

Master branch
~~~~~~~~~~~~~~
.. image:: https://coveralls.io/repos/github/JohnDoee/autotorrent/badge.svg?branch=master
:target: https://coveralls.io/github/JohnDoee/autotorrent?branch=master
.. image:: https://travis-ci.org/JohnDoee/autotorrent.svg?branch=master
:target: https://travis-ci.org/JohnDoee/autotorrent


Develop branch
~~~~~~~~~~~~~~
.. image:: https://coveralls.io/repos/github/JohnDoee/autotorrent/badge.svg?branch=develop
:target: https://coveralls.io/github/JohnDoee/autotorrent?branch=develop
.. image:: https://travis-ci.org/JohnDoee/autotorrent.svg?branch=develop
:target: https://travis-ci.org/JohnDoee/autotorrent

Install
-------

Expand All @@ -31,10 +49,10 @@ From GitHub (develop):
virtualenv autotorrent-env
autotorrent-env/bin/pip install git+https://github.com/JohnDoee/autotorrent.git#develop

Get the configuration file
Create the configuration file
::

wget -Oautotorrent.conf https://github.com/JohnDoee/autotorrent/raw/develop/autotorrent.conf.example
autotorrent-env/bin/pip --create_config autotorrent-env/autotorrent.conf

Upgrade from previous version
-----------------------------
Expand Down
6 changes: 4 additions & 2 deletions autotorrent/bencode.py
Expand Up @@ -85,8 +85,8 @@ def encode_bool(x, r):
encode_int(1, r)
else:
encode_int(0, r)
def encode_string(x, r):

def encode_string(x, r):
r.extend((str(len(x)).encode(), b':', x))

def encode_list(x, r):
Expand All @@ -105,6 +105,8 @@ def encode_dict(x,r):
encode_func = {}
encode_func[Bencached] = encode_bencached
encode_func[int] = encode_int
if six.PY2:
encode_func[long] = encode_int
encode_func[str] = encode_string
encode_func[bytes] = encode_string
encode_func[list] = encode_list
Expand Down
26 changes: 13 additions & 13 deletions autotorrent/cmd.py
Expand Up @@ -67,6 +67,12 @@ def commandline_handler():
src = os.path.join(os.path.dirname(__file__), 'autotorrent.conf.dist')
shutil.copy(src, args.create_config_file)
print('Created configuration file %r' % args.create_config_file)

client_config = {
'client': 'rtorrent',
'url': 'http://user:pass@127.0.0.1/RPC2',
'label': 'autotorrent',
}

if query_yes_no('Do you want to try and auto-configure torrent client?'):
working_clients = []
Expand All @@ -78,12 +84,6 @@ def commandline_handler():
except:
continue

client_config = {
'client': 'rtorrent',
'url': 'http://user:pass@127.0.0.1/RPC2',
'label': 'autotorrent',
}

if working_clients:
print('Found %i clients - please choose a client to use' % len(working_clients))
for i, client in enumerate(working_clients, 1):
Expand Down Expand Up @@ -113,13 +113,13 @@ def commandline_handler():
else:
print('Unable to auto-detect any clients, you will have to configure it manually.')

config = configparser.ConfigParser()
config.read(args.create_config_file)
for k, v in client_config.items():
config.set('client', k, v)
config = configparser.ConfigParser()
config.read(args.create_config_file)
for k, v in client_config.items():
config.set('client', k, v)

with open(args.create_config_file, 'w') as configfile:
config.write(configfile)
with open(args.create_config_file, 'w') as configfile:
config.write(configfile)

quit()

Expand Down Expand Up @@ -236,4 +236,4 @@ def commandline_handler():
print('')

if __name__ == '__main__':
commandline_handler()
commandline_handler()
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -13,7 +13,7 @@ def read_description():

setup(
name='autotorrent',
version='1.6.1',
version='1.6.2',
description='AutoTorrent allows easy cross-seeding',
long_description=read_description(),
author='Anders Jensen',
Expand Down

0 comments on commit c2cc369

Please sign in to comment.