[PATCH] Adapt to the new argument list for save_servers_to_config.

Vratislav Podzimek vpodzime at redhat.com
Thu Apr 30 19:10:03 UTC 2015


On Thu, 2015-04-30 at 11:47 -0400, Chris Lumens wrote:
> This was caught by pylint.
> ---
>  anaconda | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/anaconda b/anaconda
> index b124b52..565a263 100755
> --- a/anaconda
> +++ b/anaconda
> @@ -1362,7 +1362,7 @@ if __name__ == "__main__":
>      # setup ntp servers and start NTP daemon if not requested otherwise
>      if can_touch_runtime_system("start chronyd"):
>          if anaconda.ksdata.timezone.ntpservers:
> -            ntp.save_servers_to_config(anaconda.ksdata.timezone.ntpservers)
> +            ntp.save_servers_to_config([], anaconda.ksdata.timezone.ntpservers)
Ooops. This should however be:
pools, servers = \
internal_to_pools_and_servers(anaconda.ksdata.timezone.ntpservers)
ntp.save_servers_to_config(pools, servers)

without the backslash, of course, but try to explain that to Evolution.
Sigh...

It's weird my pylint didn't catch it. Here is the output I got right
before pushing the patches:

> $ tests/pylint/runpylint.sh 
> pylint reports the following issues:
> ************* Module docs/conf.py
> F0401:308,4: : Unable to import 'sphinx_rtd_theme'
> ************* Module pyanaconda/geoloc.py
> E1101:527,36: FedoraGeoIPProvider._refresh: Instance of 'LookupDict' has no 'ok' member
> E1101:571,36: HostipGeoIPProvider._refresh: Instance of 'LookupDict' has no 'ok' member
> E1101:702,36: Geocoder._reverse_geocode_nominatim: Instance of 'LookupDict' has no 'ok' member
> ************* Module anaconda
> E1120:1365,12: : No value for argument 'servers' in function call
> ************* Module pyanaconda/isys/__init__.py
> F0401: 30,4: : Unable to import '_isys'
> ************* Module pyanaconda/kickstart.py
> E0611: 67,0: : No name 'KS_SCRIPT_PREINSTALL' in module 'pykickstart.constants'
> E0611: 74,0: : No name 'PreInstallScriptSection' in module 'pykickstart.sections'
> W0232:1568,0: ReqPart: Class has no __init__ method
> E1101:1568,14: ReqPart: Module 'pykickstart.commands' has no 'reqpart' member
> E1101:1572,15: ReqPart.execute: Instance of 'ReqPart' has no 'reqpart' member
> E1101:1576,11: ReqPart.execute: Instance of 'ReqPart' has no 'addBoot' member
> ************* Module pyanaconda/packaging/rpmostreepayload.py
> E0611:131,8: RPMOSTreePayload.install: No name 'OSTree' in module 'gi.repository'
> E0611:266,8: RPMOSTreePayload.postInstall: No name 'OSTree' in module 'gi.repository'
> ************* Module scripts/anaconda-cleanup
> E1101: 59,38: : Module 'blivet.devicelibs' has no 'loop' member
> ************* Module scripts/merge-pr
> E1101:106,13: main: Instance of '_MovedItems' has no 'urllib' member
> ************* Module tests/gui/inside/__init__.py
> F0401: 19,0: : Unable to import 'dogtail.config'
> F0401: 20,0: : Unable to import 'dogtail.predicate'
> F0401: 21,0: : Unable to import 'dogtail.tree'
> F0401: 22,0: : Unable to import 'dogtail.utils'
> ************* Module tests/gui/inside/progress.py
> F0401: 20,0: : Unable to import 'dogtail.predicate'
> F0401: 21,0: : Unable to import 'dogtail.utils'
> ************* Module tests/gui/inside/rootpassword.py
> F0401: 18,0: : Unable to import 'dogtail.utils'
> ************* Module tests/gui/inside/summary.py
> F0401: 17,0: : Unable to import 'dogtail.predicate'
> F0401: 18,0: : Unable to import 'dogtail.utils'
> ************* Module tests/gui/inside/storage.py
> F0401: 18,0: : Unable to import 'dogtail.predicate'
> F0401: 19,0: : Unable to import 'dogtail.utils'
> ************* Module tests/gui/outside/__init__.py
> F0401: 87,8: Creator.archive: Unable to import 'testconfig'
> F0401:144,8: Creator.makeSuite: Unable to import 'testconfig'
> F0401:193,8: Creator.run: Unable to import 'testconfig'

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list