Skip to content

Commit 1509f30

Browse files
committed
add psutil as dependency, bump v0.9.6
#7 added the need for psutil, it seems that it is not installed by default on many systems
1 parent a84e1b5 commit 1509f30

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ A ncurses Telegram client developed in Python with the urwid library.
1111
* [Telegram-cli](https://github.com/vysheng/tg)
1212
* [urwid](http://urwid.org)
1313
* [pytg](https://github.com/luckydonald/pytg)
14+
* python-psutil
1415
* libnotify (optional)
1516
* caca-utils (optional)
1617

@@ -33,7 +34,7 @@ $ pacaur -y nctelegram-git
3334
Install dependencies:
3435

3536
```
36-
$ sudo dnf install telegram-cli python-urwid
37+
$ sudo dnf install telegram-cli python3-urwid python3-psutil
3738
```
3839

3940
Install ncTelegram through pip:
@@ -54,7 +55,7 @@ To install telegram-cli just follow its [readme](https://github.com/vysheng/tg).
5455
Install urwid:
5556

5657
```
57-
$ sudo apt-get install python3-urwid
58+
$ sudo apt-get install python3-urwid python3-psutil
5859
```
5960

6061
Install ncTelegram through pip:

nctelegram

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@
22
import os
33
import sys
44
import subprocess
5+
import psutil
56
import os.path
67
import configparser
78

89
import ncTelegram
9-
import psutil
1010

1111

1212

13-
# Check if telegram-cli is already running on the same port
14-
list_connection = [ i[4] for i in psutil.net_connections() ]
15-
for connection in list_connection:
16-
if connection and connection[1] == 4458:
13+
for connection in psutil.net_connections():
14+
if connection[4] and connection[4][1] == 4458:
1715
print('telegram-cli is already running, kill it before starting ncTelegram')
1816
sys.exit(1)
1917

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from distutils.core import setup
44

55
setup(name='ncTelegram',
6-
version='0.9.5',
6+
version='0.9.6',
77
description='A curse Telegram client',
88
license='GPLv3',
99
author='Sébastien Lemaire',

0 commit comments

Comments
 (0)