Changeset 4451


Ignore:
Timestamp:
Apr 26, 2017, 12:33:52 PM (2 years ago)
Author:
mabarracus
Message:

Fix processing errors with wrong filenames

Location:
syncer/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • syncer/trunk/fuentes/debian/changelog

    r4428 r4451  
     1syncer (1.3) xenial; urgency=medium
     2
     3  * Fix processing errors with wrong filenames
     4
     5 -- M.Angel Juan <m.angel.juan@gmail.com>  Wed, 26 Apr 2017 12:32:44 +0200
     6
    17syncer (1.2) xenial; urgency=medium
    28
  • syncer/trunk/fuentes/syncer.install/usr/lib/syncer/plugins/plank.py

    r4039 r4451  
    4141                        else:
    4242                            filelist.append(os.path.join(root,file))
    43             return filelist
     43            if filelist == []:
     44                return None
     45            else:
     46                return filelist
    4447
    4548        except:
     
    7073                    where='skel'
    7174                    file_name = self.search_item(where, params['option'])
    72                     if file_name == None:
     75                    if not file_name:
    7376                        return True,'Not found '+params['option']
     77
    7478                # check if already added
    7579                if self.search_item('plank',params['option']):
    7680                    return True,'Already added'
     81
    7782                # create element
    7883                if where == 'applications':
     
    8489                with open(os.path.expanduser('~')+'/.config/plank/dock1/launchers/'+params['option']+'.dockitem','w') as f:
    8590                    f.writelines(entry)
     91
    8692                return True,'Added {}'.format(file_name)
    8793            except Exception as e:
    88                 return False,str(e)
     94                return True,'Not added, error is: {}'.format(str(e))
    8995        elif params['action'] == 'remove':
    9096            try:
Note: See TracChangeset for help on using the changeset viewer.