[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kstars] kstars/data/scripts: Do not extract empty names
From:       Yuri Chornoivan <yurchor () ukr ! net>
Date:       2015-01-31 18:50:29
Message-ID: E1YHd7l-0007nA-4o () scm ! kde ! org
[Download RAW message or body]

Git commit 25f5ac0b8f15833f5f3b84fc24d3fa6116000032 by Yuri Chornoivan.
Committed on 31/01/2015 at 18:50.
Pushed by yurchor into branch 'master'.

Do not extract empty names

M  +3    -2    kstars/data/scripts/extract_geo_data.py

http://commits.kde.org/kstars/25f5ac0b8f15833f5f3b84fc24d3fa6116000032

diff --git a/kstars/data/scripts/extract_geo_data.py b/kstars/data/scripts/extract_geo_data.py
index 69cf5a4..590e255 100644
--- a/kstars/data/scripts/extract_geo_data.py
+++ b/kstars/data/scripts/extract_geo_data.py
@@ -17,8 +17,9 @@ for row in all_rows:
 cursor.execute('''SELECT DISTINCT Province from city''')
 all_rows = cursor.fetchall()
 all_rows.sort()
-for row in all_rows:  
-  print('xi18nc("Province name (optional, rarely needs a translation)", "{0}")'.format(row[0]))
+for row in all_rows:
+  if format(row[0]) != '':
+    print('xi18nc("Province name (optional, rarely needs a translation)", "{0}")'.format(row[0]))
 
 cursor.execute('''SELECT DISTINCT Country from city''')
 all_rows = cursor.fetchall()
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic