Skip to content
Snippets Groups Projects
Unverified Commit 6c435cd5 authored by endrift's avatar endrift Committed by GitHub
Browse files

Merge pull request #10 from tristansokol/tristan/add-import-confirmation

add a confirmation statement to importing
parents 06629f64 ef4be66c
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ def groom_rom(rom):
def merge(*args, quiet=True):
import retro
known_hashes = {}
imported_games = 0
for game in retro.list_games():
shafile = os.path.join(retro.get_game_path(game), 'rom.sha')
with open(shafile) as f:
......@@ -75,3 +76,6 @@ def merge(*args, quiet=True):
print('Importing', game)
with open(os.path.join(retro.get_game_path(game), 'rom%s' % ext), 'wb') as f:
f.write(data)
imported_games += 1
if not quiet:
print('Imported %i games' % imported_games)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment