summaryrefslogtreecommitdiffstats
path: root/deluge/ui/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'deluge/ui/common.py')
-rw-r--r--deluge/ui/common.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/deluge/ui/common.py b/deluge/ui/common.py
index c5064a6f4..f9f774e23 100644
--- a/deluge/ui/common.py
+++ b/deluge/ui/common.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
#
# Copyright (C) Damien Churchill 2008-2009 <damoxc@gmail.com>
# Copyright (C) Andrew Resch 2009 <andrewresch@gmail.com>
@@ -11,8 +10,6 @@
"""
The ui common module contains methods and classes that are deemed useful for all the interfaces.
"""
-from __future__ import unicode_literals
-
import logging
import os
from hashlib import sha1 as sha
@@ -167,7 +164,7 @@ DISK_CACHE_KEYS = [
]
-class TorrentInfo(object):
+class TorrentInfo:
"""Collects information about a torrent file.
Args:
@@ -186,7 +183,7 @@ class TorrentInfo(object):
try:
with open(filename, 'rb') as _file:
self._filedata = _file.read()
- except IOError as ex:
+ except OSError as ex:
log.warning('Unable to open %s: %s', filename, ex)
return
@@ -387,7 +384,7 @@ class TorrentInfo(object):
return self._filedata
-class FileTree2(object):
+class FileTree2:
"""
Converts a list of paths in to a file tree.
@@ -467,7 +464,7 @@ class FileTree2(object):
return '\n'.join(lines)
-class FileTree(object):
+class FileTree:
"""
Convert a list of paths in a file tree.