diff options
author | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2009-05-27 23:03:56 +0200 |
---|---|---|
committer | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2010-10-31 11:24:36 +0100 |
commit | e1f18b8a841f791d6683a890db7a0a11c3b25318 (patch) | |
tree | db1a2cbf9bc61b31407a46686bfe460275e09ac2 | |
parent | 6a0015a7e0deaf7f82e64fbfb5ee62d2058dd95f (diff) |
Remove integer casts and replace them with long integer casts
-rwxr-xr-x | youtube-dl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/youtube-dl b/youtube-dl index 6afdc0e6a..06ba25d9a 100755 --- a/youtube-dl +++ b/youtube-dl @@ -182,13 +182,13 @@ class FileDownloader(object): new_min = max(bytes / 2.0, 1.0) new_max = min(max(bytes * 2.0, 1.0), 4194304) # Do not surpass 4 MB if elapsed_time < 0.001: - return int(new_max) + return long(new_max) rate = bytes / elapsed_time if rate > new_max: - return int(new_max) + return long(new_max) if rate < new_min: - return int(new_min) - return int(rate) + return long(new_min) + return long(rate) @staticmethod def parse_bytes(bytestr): @@ -895,7 +895,7 @@ class YoutubeSearchIE(InfoExtractor): return else: try: - n = int(prefix) + n = long(prefix) if n <= 0: self._downloader.trouble(u'ERROR: invalid download number %s for query "%s"' % (n, query)) return @@ -904,7 +904,7 @@ class YoutubeSearchIE(InfoExtractor): n = self._max_youtube_results self._download_n_results(query, n) return - except ValueError: # parsing prefix as int fails + except ValueError: # parsing prefix as integer fails self._download_n_results(query, 1) return |