def _handle_old_style_images(staging_path):
 file_num = 0
 for filename in ('snap.vhd', 'image.vhd', 'base.vhd'):
  path = os.path.join(staging_path, filename)
  if os.path.exists(path):
   _rename(path, os.path.join(staging_path, ('%d.vhd' % file_num)))
   file_num += 1

def _handle_old_style_images ( staging_path ) : file_num = 0 for filename in ( 'snap.vhd' , 'image.vhd' , 'base.vhd' ) : path = os . path . join ( staging_path , filename ) if os . path . exists ( path ) : _rename ( path , os . path . join ( staging_path , ( '%d.vhd' % file_num ) ) ) file_num += 1
rename files to conform to new image format .