dvershinin / lastversion

Lazy formatting of message string passed to logging module PYL-W1202
Performance
2 months ago7 months old
Use lazy % formatting in logging functions
323                fail_fmt = 'Latest v{} fails semantic {} constraint against current v{}'
324                if latest_major != current_major:
325                    log.warning(
326                        fail_fmt.format(res['version'], sem, res['current_version']))327                    sys.exit(4)
328                if sem == 'patch' and latest_minor != current_minor:
329                    log.warning(
Use lazy % formatting in logging functions
327                    sys.exit(4)
328                if sem == 'patch' and latest_minor != current_minor:
329                    log.warning(
330                        fail_fmt.format(res['version'], sem, res['current_version']))331                    sys.exit(4)
332    else:
333        log.info('No newer version than already present in spec file')
Use lazy % formatting in logging functions
606                log.warning('Please install lastversion using YUM or DNF so it can check current '
607                            'program version. This is helpful to prevent unnecessary downloads')
608            if installed_version and Version(installed_version) >= Version(res['version']):
609                log.warning('Newest version {} is already installed'.format(installed_version))610                sys.exit(0)
611            # pass RPM URLs directly to package management program
612            try: