mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-08 17:09:33 +08:00
fix: 优化代码细节
This commit is contained in:
@@ -334,11 +334,11 @@ func (dev *AndroidDevice) Uninstall(packageName string) error {
|
|||||||
|
|
||||||
func (dev *AndroidDevice) Install(appPath string, opts *InstallOptions) error {
|
func (dev *AndroidDevice) Install(appPath string, opts *InstallOptions) error {
|
||||||
app, err := os.Open(appPath)
|
app, err := os.Open(appPath)
|
||||||
defer app.Close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, fmt.Sprintf("install %s open file failed", appPath))
|
return errors.Wrap(err, fmt.Sprintf("install %s open file failed", appPath))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defer app.Close()
|
||||||
brand, err := dev.d.Brand()
|
brand, err := dev.d.Brand()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user