Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
supersonicAI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dmath010
supersonicAI
Commits
ef4be66c
Commit
ef4be66c
authored
6 years ago
by
Tristan Sokol
Browse files
Options
Downloads
Patches
Plain Diff
add a confirmation statement to importing
parent
06629f64
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
retro/data.py
+4
-0
4 additions, 0 deletions
retro/data.py
with
4 additions
and
0 deletions
retro/data.py
+
4
−
0
View file @
ef4be66c
...
@@ -55,6 +55,7 @@ def groom_rom(rom):
...
@@ -55,6 +55,7 @@ def groom_rom(rom):
def
merge
(
*
args
,
quiet
=
True
):
def
merge
(
*
args
,
quiet
=
True
):
import
retro
import
retro
known_hashes
=
{}
known_hashes
=
{}
imported_games
=
0
for
game
in
retro
.
list_games
():
for
game
in
retro
.
list_games
():
shafile
=
os
.
path
.
join
(
retro
.
get_game_path
(
game
),
'
rom.sha
'
)
shafile
=
os
.
path
.
join
(
retro
.
get_game_path
(
game
),
'
rom.sha
'
)
with
open
(
shafile
)
as
f
:
with
open
(
shafile
)
as
f
:
...
@@ -75,3 +76,6 @@ def merge(*args, quiet=True):
...
@@ -75,3 +76,6 @@ def merge(*args, quiet=True):
print
(
'
Importing
'
,
game
)
print
(
'
Importing
'
,
game
)
with
open
(
os
.
path
.
join
(
retro
.
get_game_path
(
game
),
'
rom%s
'
%
ext
),
'
wb
'
)
as
f
:
with
open
(
os
.
path
.
join
(
retro
.
get_game_path
(
game
),
'
rom%s
'
%
ext
),
'
wb
'
)
as
f
:
f
.
write
(
data
)
f
.
write
(
data
)
imported_games
+=
1
if
not
quiet
:
print
(
'
Imported %i games
'
%
imported_games
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment