Skip to content

Commit

Permalink
Fix Socket error: timed out #25
Browse files Browse the repository at this point in the history
Fix linter warnings
  • Loading branch information
Kosat committed Mar 23, 2019
1 parent a36f4c2 commit 3c7ba52
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=missing-docstring
from setuptools import setup
from telegram_messages_dump import __version__

Expand Down
1 change: 1 addition & 0 deletions telegram_messages_dump/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring

__version__ = '0.4'
8 changes: 6 additions & 2 deletions telegram_messages_dump/telegram_dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
from collections import deque
from getpass import getpass
from time import sleep
from telethon import TelegramClient, sync
from telethon.errors import FloodWaitError, SessionPasswordNeededError, UsernameNotOccupiedError, UsernameInvalidError
from telethon import TelegramClient, sync # pylint: disable=unused-import
from telethon.errors import (FloodWaitError,
SessionPasswordNeededError,
UsernameNotOccupiedError,
UsernameInvalidError)
from telethon.tl.functions.contacts import ResolveUsernameRequest
from telegram_messages_dump.utils import sprint
from telegram_messages_dump.utils import JOIN_CHAT_PREFIX_URL
Expand All @@ -33,6 +36,7 @@ def __init__(self, session_user_id, settings, metadata, exporter):
super().__init__(session_user_id,
settings.api_id,
settings.api_hash,
timeout=40, #seconds
proxy=None)

# Settings as specified by user or defaults or from metadata
Expand Down

0 comments on commit 3c7ba52

Please sign in to comment.