diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2018-07-19 13:47:18 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-26 13:16:40 +0100 |
commit | 869e501544960f638edfe17c9d7500b54d05837e (patch) | |
tree | f6967d2d1648f92fd2ec780b02971e0eb8f4c2e4 /scripts/runqemu | |
parent | 53b50b5d11dfd6f299116edc7254ebc1f29f19e5 (diff) | |
download | poky-869e501544960f638edfe17c9d7500b54d05837e.tar.gz |
logging: use warning instead warn
The warn method is deprecated. We should use the documented warning instead.
Quoting from the python's official doc:
"""
Note: There is an obsolete method warn which is functionally identical to warning.
As warn is deprecated, please do not use it - use warning instead.
"""
(From OE-Core rev: f467fd277eb77336097cfc0f5f329bdc8d0f70cb)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 73d7d5818b..f52b9a82ea 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -286,7 +286,7 @@ class BaseConfig(object): | |||
286 | def check_arg_fstype(self, fst): | 286 | def check_arg_fstype(self, fst): |
287 | """Check and set FSTYPE""" | 287 | """Check and set FSTYPE""" |
288 | if fst not in self.fstypes + self.vmtypes: | 288 | if fst not in self.fstypes + self.vmtypes: |
289 | logger.warn("Maybe unsupported FSTYPE: %s" % fst) | 289 | logger.warning("Maybe unsupported FSTYPE: %s" % fst) |
290 | if not self.fstype or self.fstype == fst: | 290 | if not self.fstype or self.fstype == fst: |
291 | if fst == 'ramfs': | 291 | if fst == 'ramfs': |
292 | fst = 'cpio.gz' | 292 | fst = 'cpio.gz' |
@@ -348,7 +348,7 @@ class BaseConfig(object): | |||
348 | self.qemuboot = qb | 348 | self.qemuboot = qb |
349 | self.qbconfload = True | 349 | self.qbconfload = True |
350 | else: | 350 | else: |
351 | logger.warn("%s doesn't exist" % qb) | 351 | logger.warning("%s doesn't exist" % qb) |
352 | else: | 352 | else: |
353 | raise RunQemuError("Can't find FSTYPE from: %s" % p) | 353 | raise RunQemuError("Can't find FSTYPE from: %s" % p) |
354 | 354 | ||
@@ -691,7 +691,7 @@ class BaseConfig(object): | |||
691 | if not self.get('QB_AUDIO_DRV'): | 691 | if not self.get('QB_AUDIO_DRV'): |
692 | raise RunQemuError("QB_AUDIO_DRV is NULL, this board doesn't support audio") | 692 | raise RunQemuError("QB_AUDIO_DRV is NULL, this board doesn't support audio") |
693 | if not self.get('QB_AUDIO_OPT'): | 693 | if not self.get('QB_AUDIO_OPT'): |
694 | logger.warn('QB_AUDIO_OPT is NULL, you may need define it to make audio work') | 694 | logger.warning('QB_AUDIO_OPT is NULL, you may need define it to make audio work') |
695 | else: | 695 | else: |
696 | self.qemu_opt_script += ' %s' % self.get('QB_AUDIO_OPT') | 696 | self.qemu_opt_script += ' %s' % self.get('QB_AUDIO_OPT') |
697 | os.putenv('QEMU_AUDIO_DRV', self.get('QB_AUDIO_DRV')) | 697 | os.putenv('QEMU_AUDIO_DRV', self.get('QB_AUDIO_DRV')) |
@@ -713,7 +713,7 @@ class BaseConfig(object): | |||
713 | if self.get('DEPLOY_DIR_IMAGE'): | 713 | if self.get('DEPLOY_DIR_IMAGE'): |
714 | deploy_dir_image = self.get('DEPLOY_DIR_IMAGE') | 714 | deploy_dir_image = self.get('DEPLOY_DIR_IMAGE') |
715 | else: | 715 | else: |
716 | logger.warn("Can't find qemuboot conf file, DEPLOY_DIR_IMAGE is NULL!") | 716 | logger.warning("Can't find qemuboot conf file, DEPLOY_DIR_IMAGE is NULL!") |
717 | return | 717 | return |
718 | 718 | ||
719 | if self.rootfs and not os.path.exists(self.rootfs): | 719 | if self.rootfs and not os.path.exists(self.rootfs): |
@@ -1060,9 +1060,9 @@ class BaseConfig(object): | |||
1060 | # virtio might have been selected explicitly (just use it), or | 1060 | # virtio might have been selected explicitly (just use it), or |
1061 | # is used as fallback (then warn about that). | 1061 | # is used as fallback (then warn about that). |
1062 | if not drive_type.startswith("/dev/vd"): | 1062 | if not drive_type.startswith("/dev/vd"): |
1063 | logger.warn("Unknown QB_DRIVE_TYPE: %s" % drive_type) | 1063 | logger.warning("Unknown QB_DRIVE_TYPE: %s" % drive_type) |
1064 | logger.warn("Failed to figure out drive type, consider define or fix QB_DRIVE_TYPE") | 1064 | logger.warning("Failed to figure out drive type, consider define or fix QB_DRIVE_TYPE") |
1065 | logger.warn('Trying to use virtio block drive') | 1065 | logger.warning('Trying to use virtio block drive') |
1066 | vm_drive = '-drive if=virtio,file=%s,format=%s' % (self.rootfs, rootfs_format) | 1066 | vm_drive = '-drive if=virtio,file=%s,format=%s' % (self.rootfs, rootfs_format) |
1067 | 1067 | ||
1068 | # All branches above set vm_drive. | 1068 | # All branches above set vm_drive. |
@@ -1266,7 +1266,7 @@ class BaseConfig(object): | |||
1266 | self.bitbake_e = subprocess.check_output(cmd, shell=True).decode('utf-8') | 1266 | self.bitbake_e = subprocess.check_output(cmd, shell=True).decode('utf-8') |
1267 | except subprocess.CalledProcessError as err: | 1267 | except subprocess.CalledProcessError as err: |
1268 | self.bitbake_e = '' | 1268 | self.bitbake_e = '' |
1269 | logger.warn("Couldn't run 'bitbake -e' to gather environment information:\n%s" % err.output.decode('utf-8')) | 1269 | logger.warning("Couldn't run 'bitbake -e' to gather environment information:\n%s" % err.output.decode('utf-8')) |
1270 | 1270 | ||
1271 | def validate_combos(self): | 1271 | def validate_combos(self): |
1272 | if (self.fstype in self.vmtypes) and self.kernel: | 1272 | if (self.fstype in self.vmtypes) and self.kernel: |