1212import sys
1313from pathlib import Path
1414
15- import six
16-
1715from . import resourcePath , utils
1816
1917# cache of all the preferences
@@ -191,7 +189,7 @@ def create_stamped_path(core_name, filepath, sub_dir='workboxes', time_str=None)
191189
192190 path .parent .mkdir (exist_ok = True )
193191
194- path = six . text_type (path )
192+ path = str (path )
195193 return path
196194
197195
@@ -284,7 +282,7 @@ def get_backup_version_info(core_name, workbox_id, versionType, backup_file=None
284282 idx += 1
285283 idx = min (idx , count - 1 )
286284
287- filepath = six . text_type (files [idx ])
285+ filepath = str (files [idx ])
288286 display_idx = idx + 1
289287 return filepath , display_idx , count
290288
@@ -322,7 +320,7 @@ def update_pref_args(core_name, pref_dict, old_name, update_data):
322320 orig_pref = pref_dict .pop (old_name )
323321 pref = orig_pref [:] if isinstance (orig_pref , list ) else orig_pref
324322
325- if isinstance (pref , six . text_type ):
323+ if isinstance (pref , str ):
326324 replacements = update_data .get ("replace" , [])
327325 for replacement in replacements :
328326 pref = pref .replace (* replacement )
@@ -332,11 +330,11 @@ def update_pref_args(core_name, pref_dict, old_name, update_data):
332330 newfilepath = create_stamped_path (core_name , pref )
333331 orig_filepath = workbox_dir / orig_pref
334332 if orig_filepath .is_file ():
335- orig_filepath = six . text_type (orig_filepath )
333+ orig_filepath = str (orig_filepath )
336334
337335 if not Path (newfilepath ).is_file ():
338336 shutil .copy (orig_filepath , newfilepath )
339- newfilepath = six . text_type (Path (newfilepath ).relative_to (workbox_dir ))
337+ newfilepath = str (Path (newfilepath ).relative_to (workbox_dir ))
340338
341339 pref_dict .update ({"backup_file" : newfilepath })
342340
0 commit comments