fixed empty rom database for systems

This commit is contained in:
Thomas Schneider 2015-01-31 14:23:24 +01:00
parent 536682e9ac
commit 69089aea65
2 changed files with 8 additions and 3 deletions

View File

@ -11,7 +11,10 @@ if len(sys.argv)==2:
print str(system) +" "+ systems[system]
elif len(sys.argv)==3:
print "Fields you get:"
game=vgdb.get_console_fg(sys.argv[2])
if game==[]:
print "No Roms listed for this system"
quit()
print "Fields you get:"
for field in game:
print field+" -> "+str(game[field])

View File

@ -78,6 +78,8 @@ class vgdb:
def get_console_fg(self,system):
rom=self.cur.execute('SELECT * FROM ROMS where systemID='+str(system)).fetchone()
# games.append(self.get_gameinfo(rom['romID']))
return dict(self.get_gameinfo(rom['romID']).items()+rom.items())
if rom==None:
return []
else:
return dict(self.get_gameinfo(rom['romID']).items()+rom.items())