Ignore:
Timestamp:
Jul 24, 2017, 8:59:44 AM (22 months ago)
Author:
jrpelegrina
Message:

Show notification when cache is updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-gdrive/trunk/fuentes/lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator

    r5574 r5581  
    1515import random
    1616import notify2
     17import time
    1718
    1819
     
    402403        def refresh_cache (self,widget,profile):
    403404
    404                 cmd="google-drive-ocamlfuse -cc -label %s"%profile
    405                 os.system(cmd) 
     405                try:
     406                        cmd="google-drive-ocamlfuse -cc -label %s"%profile
     407                        os.system(cmd)
     408                        message=_("Cache updated successfully")
     409                               
     410                except Exception as e:
     411                        message=_("An error occurred updating the cache. Try again")
     412               
     413                message=message.decode("UTF-8")
     414
     415                time.sleep(0.5)
     416                self.show_message(profile + ": " + message)     
    406417
    407418        #def refresh_cache     
Note: See TracChangeset for help on using the changeset viewer.