Skip to content

Commit 914b072

Browse files
committed
Allow retrieving data without update
1 parent e2e1fa2 commit 914b072

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pydwdapi/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ def __init__(self,
138138

139139

140140
def update(self):
141+
if not self.ftp_user or not self.ftp_password:
142+
logger.warn("No username or password given, will not download new data")
143+
return
141144
with Database(self.database_file) as database:
142145
if self.sources.update(self.ftp_user, self.ftp_password,
143146
self.stations, database):

0 commit comments

Comments
 (0)