Skip to content

Commit 4eab52b

Browse files
Austin Kimraveit65
authored andcommitted
remove more -u modifier for dropbox-cli
from: dropbox/nautilus-dropbox#69
1 parent 686bae0 commit 4eab52b

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

‎caja-dropbox.in‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ class DropboxCommand(object):
630630
self.s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
631631
self.s.settimeout(timeout)
632632
try:
633-
self.s.connect(os.path.expanduser(u'~/.dropbox/command_socket'))
633+
self.s.connect(os.path.expanduser('~/.dropbox/command_socket'))
634634
except socket.error:
635635
raise DropboxCommand.CouldntConnectError()
636636
self.f = self.s.makefile("rw", 4096)
@@ -899,7 +899,7 @@ options:
899899
path = "%s (File doesn't exist!)" % os.path.basename(file_path)
900900
return (path, path)
901901
try:
902-
status = dc.icon_overlay_file_status(path=file_path).get(u'status', [None])[0]
902+
status = dc.icon_overlay_file_status(path=file_path).get('status', [None])[0]
903903
except DropboxCommand.CommandError as e:
904904
path = "%s (%s)" % (os.path.basename(file_path), e)
905905
return (path, path)
@@ -940,7 +940,7 @@ options:
940940
if type(subname) != str:
941941
continue
942942

943-
if not options.all and subname[0] == u'.':
943+
if not options.all and subname[0] == '.':
944944
continue
945945

946946
try:
@@ -1005,7 +1005,7 @@ options:
10051005
continue
10061006

10071007
try:
1008-
status = dc.icon_overlay_file_status(path=fp).get(u'status', [u'unknown'])[0]
1008+
status = dc.icon_overlay_file_status(path=fp).get('status', ['unknown'])[0]
10091009
console_print("%-*s %s" % (indent, file+':', status))
10101010
except DropboxCommand.CommandError as e:
10111011
console_print("%-*s %s" % (indent, file+':', e))
@@ -1037,7 +1037,7 @@ Prints out a public url for FILE (which must be in your public folder).
10371037
try:
10381038
with closing(DropboxCommand()) as dc:
10391039
try:
1040-
console_print(dc.get_public_link(path=os.path.abspath(args[0])).get(u'link', [u'No Link'])[0])
1040+
console_print(dc.get_public_link(path=os.path.abspath(args[0])).get('link', ['No Link'])[0])
10411041
except DropboxCommand.CommandError as e:
10421042
console_print("Couldn't get public url: " + str(e))
10431043
except DropboxCommand.BadConnectionError:
@@ -1063,7 +1063,7 @@ Prints out a shared link for FILE.
10631063
with closing(DropboxCommand()) as dc:
10641064
try:
10651065
path = os.path.abspath(args[0])
1066-
link = dc.get_shared_link(path=path).get('link', [u'No link'])[0]
1066+
link = dc.get_shared_link(path=path).get('link', ['No link'])[0]
10671067
console_print(link)
10681068
except DropboxCommand.CommandError as e:
10691069
console_print("Couldn't get shared link: " + str(e))
@@ -1097,10 +1097,10 @@ PASSWORD - (optional) proxy password (only valid with "manual" mode)
10971097
type_ = args[1].lower()
10981098

10991099
if (len(args) == 0 or
1100-
mode not in [u'none', u'auto', u'manual'] or
1100+
mode not in ['none', 'auto', 'manual'] or
11011101
(mode == 'manual' and len(args) not in (4, 6)) or
11021102
(mode != 'manual' and len(args) != 1) or
1103-
(mode == 'manual' and type_ not in [u'http', u'socks4', u'socks5'])):
1103+
(mode == 'manual' and type_ not in ['http', 'socks4', 'socks5'])):
11041104
# Print help
11051105
console_print(proxy.__doc__, linebreak=False)
11061106
return
@@ -1119,7 +1119,7 @@ PASSWORD - (optional) proxy password (only valid with "manual" mode)
11191119
with closing(DropboxCommand()) as dc:
11201120
try:
11211121
dc.set_proxy_settings(**kwargs)
1122-
console_print(u'set')
1122+
console_print('set')
11231123
except DropboxCommand.CommandError as e:
11241124
console_print("Couldn't set proxy: " + str(e))
11251125
except DropboxCommand.BadConnectionError:
@@ -1149,42 +1149,42 @@ UPLOAD - one of "unlimited", "auto", or a manual limit in KB/s
11491149

11501150
download_limit = None
11511151
download_mode = None
1152-
if downlimit == u'unlimited':
1152+
if downlimit == 'unlimited':
11531153
download_mode = downlimit
11541154
else:
11551155
try:
11561156
download_limit = int(downlimit)
1157-
download_mode = u'manual'
1157+
download_mode = 'manual'
11581158
except ValueError:
11591159
console_print(throttle.__doc__, linebreak=False)
11601160
return
11611161

11621162
upload_limit = None
11631163
upload_mode = None
1164-
if uplimit in [u'unlimited', u'auto']:
1164+
if uplimit in ['unlimited', 'auto']:
11651165
upload_mode = uplimit
11661166
else:
11671167
try:
11681168
upload_limit = int(uplimit)
1169-
upload_mode = u'manual'
1169+
upload_mode = 'manual'
11701170
except ValueError:
11711171
console_print(throttle.__doc__, linebreak=False)
11721172
return
11731173

11741174
kwargs = {
1175-
u'download_mode': download_mode,
1176-
u'upload_mode': upload_mode,
1175+
'download_mode': download_mode,
1176+
'upload_mode': upload_mode,
11771177
}
11781178
if download_limit:
1179-
kwargs[u'download_limit'] = str(download_limit)
1179+
kwargs['download_limit'] = str(download_limit)
11801180
if upload_limit:
1181-
kwargs[u'upload_limit'] = str(upload_limit)
1181+
kwargs['upload_limit'] = str(upload_limit)
11821182

11831183
try:
11841184
with closing(DropboxCommand()) as dc:
11851185
try:
11861186
dc.set_bandwidth_limits(**kwargs)
1187-
console_print(u'set')
1187+
console_print('set')
11881188
except DropboxCommand.CommandError as e:
11891189
console_print("Couldn't set bandwidth limits: " + str(e))
11901190
except DropboxCommand.BadConnectionError:
@@ -1209,9 +1209,9 @@ Prints out the current status of the Dropbox daemon.
12091209
try:
12101210
with closing(DropboxCommand()) as dc:
12111211
try:
1212-
lines = dc.get_dropbox_status()[u'status']
1212+
lines = dc.get_dropbox_status()['status']
12131213
if len(lines) == 0:
1214-
console_print(u'Idle')
1214+
console_print('Idle')
12151215
else:
12161216
for line in lines:
12171217
console_print(line)
@@ -1322,12 +1322,12 @@ Any specified path must be within Dropbox.
13221322
try:
13231323
with closing(DropboxCommand()) as dc:
13241324
try:
1325-
lines = [relpath(path) for path in dc.get_ignore_set()[u'ignore_set']]
1325+
lines = [relpath(path) for path in dc.get_ignore_set()['ignore_set']]
13261326
lines.sort()
13271327
if len(lines) == 0:
1328-
console_print(u'No directories are being ignored.')
1328+
console_print('No directories are being ignored.')
13291329
else:
1330-
console_print(u'Excluded: ')
1330+
console_print('Excluded: ')
13311331
for line in lines:
13321332
console_print(str(line))
13331333
except KeyError:
@@ -1452,10 +1452,10 @@ options:
14521452

14531453

14541454
def can_reroll_autostart():
1455-
return ".config" in os.listdir(os.path.expanduser(u'~'))
1455+
return ".config" in os.listdir(os.path.expanduser('~'))
14561456

14571457
def reroll_autostart(should_autostart):
1458-
home_dir = os.path.expanduser(u'~')
1458+
home_dir = os.path.expanduser('~')
14591459
contents = os.listdir(home_dir)
14601460

14611461
# UBUNTU

0 commit comments

Comments
 (0)