dom0: qvm-sync-appmenus: add missing object name to vars
This commit is contained in:
		
							parent
							
								
									5714410724
								
							
						
					
					
						commit
						9375b8d6ff
					
				@ -162,23 +162,23 @@ def main():
 | 
			
		||||
        print "--> Got {0} appmenus, storing to disk".format(str(len(new_appmenus)))
 | 
			
		||||
    for appmenu_file in new_appmenus.keys():
 | 
			
		||||
        if options.verbose:
 | 
			
		||||
            if os.path.exists(appmenus_templates_dir + '/' + appmenu_file):
 | 
			
		||||
            if os.path.exists(vm.appmenus_templates_dir + '/' + appmenu_file):
 | 
			
		||||
                print "---> Updating {0}".format(appmenu_file)
 | 
			
		||||
            else:
 | 
			
		||||
                print "---> Creating {0}".format(appmenu_file)
 | 
			
		||||
        create_template(appmenus_templates_dir + '/' + appmenu_file, new_appmenus[appmenu_file])
 | 
			
		||||
        create_template(vm.appmenus_templates_dir + '/' + appmenu_file, new_appmenus[appmenu_file])
 | 
			
		||||
 | 
			
		||||
    # Delete appmenus of remove applications
 | 
			
		||||
    if options.verbose:
 | 
			
		||||
        print "--> Cleaning old files"
 | 
			
		||||
    for appmenu_file in os.listdir(appmenus_templates_dir):
 | 
			
		||||
    for appmenu_file in os.listdir(vm.appmenus_templates_dir):
 | 
			
		||||
        if not fnmatch.fnmatch(appmenu_file, '*.desktop'):
 | 
			
		||||
            continue
 | 
			
		||||
 | 
			
		||||
        if not new_appmenus.has_key(appmenu_file):
 | 
			
		||||
            if options.verbose:
 | 
			
		||||
                print "---> Removing {0}".format(appmenu_file)
 | 
			
		||||
            os.unlink(appmenus_templates_dir + '/' + appmenu_file)
 | 
			
		||||
            os.unlink(vm.appmenus_templates_dir + '/' + appmenu_file)
 | 
			
		||||
 | 
			
		||||
main()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user