Skip to content

Commit bc6b472

Browse files
committed
Fix syntax warning in sync.py re.split, use r-string
1 parent 76ea385 commit bc6b472

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

discodos/cmd/sync.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ def _get_fileobj_mtime(self, fileobj):
155155
return '{}_{}'.format(fileobj.name, local_mtime)
156156

157157
def _get_times_tuple(self, filestr): # get epoch from string someth_YYYY-MM-DD_HHMMMSS
158-
time = re.split('[^\d]', filestr)[-1]
159-
day = re.split('[^\d]', filestr)[-2]
160-
month = re.split('[^\d]', filestr)[-3]
161-
year = re.split('[^\d]', filestr)[-4]
158+
time = re.split(r'[^\d]', filestr)[-1]
159+
day = re.split(r'[^\d]', filestr)[-2]
160+
month = re.split(r'[^\d]', filestr)[-3]
161+
year = re.split(r'[^\d]', filestr)[-4]
162162
filestr_date_digits = "{}{}{}{}".format(year, month, day, time)
163163
log.debug('Sync._get_times_tuple: filestr_date_digits: {}'.format(filestr_date_digits))
164164
if not filestr_date_digits:

0 commit comments

Comments
 (0)