Bläddra i källkod

remove .conf from .gitignore. Small bug fixes.

mike 5 år sedan
förälder
incheckning
cd0bcc0790
2 ändrade filer med 4 tillägg och 3 borttagningar
  1. 1 1
      .gitignore
  2. 3 2
      index.py

+ 1 - 1
.gitignore

@@ -1,4 +1,4 @@
 __pycache__
 *.swp
 *.log
-*.conf
+#*.conf

+ 3 - 2
index.py

@@ -455,8 +455,9 @@ if __name__ == '__main__':
     mysearch = Search()		## Search used to take county as parameter, so this loop would work.  Now Search class contains list.  loop must occur in getmlsdata module
     mydata = gmls.getmlsdata(mysearch, county)
 
-    for listing in mydata:
-      myresults.append(listing)
+    if mydata:				#Avoids a crash is there is no data
+      for listing in mydata:
+        myresults.append(listing)
 
 #  print(len(myresults))
 #  print(myresults[0].address)