Small fixes
This commit is contained in:
parent
5f675974cb
commit
f543eea7e5
6
ddns.py
6
ddns.py
@ -234,7 +234,7 @@ def list_sub_domains(domain):
|
||||
print("[red]Error: [/red]No such domain. Check spelling or use ddns -d to show all top domains.")
|
||||
else:
|
||||
print('\n\nCurrent sub domains for [b]%s[/b]' % (domain))
|
||||
print('=====================================================================')
|
||||
print('===============================================================================================')
|
||||
cursor.execute('SELECT id FROM domains WHERE name LIKE ?', (domain,))
|
||||
topdomain_id = cursor.fetchone()[0]
|
||||
cursor.execute('SELECT COUNT(*) FROM subdomains WHERE main_id LIKE ?',(topdomain_id,))
|
||||
@ -242,12 +242,12 @@ def list_sub_domains(domain):
|
||||
if count == 0:
|
||||
print('[red]Error:[/red] No sub domains for [b]%s[/b]' % (domain))
|
||||
else:
|
||||
cursor.execute('SELECT name,last_updated FROM subdomains WHERE main_id LIKE ?',(topdomain_id,) )
|
||||
cursor.execute('SELECT name,last_updated,last_checked FROM subdomains WHERE main_id LIKE ?',(topdomain_id,) )
|
||||
subdomains = cursor.fetchall()
|
||||
for i in subdomains:
|
||||
topdomain = i[0]+'.'+domain
|
||||
topdomain = "{:<25}".format(topdomain)
|
||||
print(topdomain+'\tLast updated : '+i[1])
|
||||
print(topdomain+'\tUpdated : '+i[1]+'\tChecked : '+i[2])
|
||||
print('\n')
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user