mozdevice - devicemanager.py bad indentation in findOpenPort

RESOLVED FIXED

Status

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bc, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Created attachment 710657 [details] [diff] [review]
patch

I ran into this running multiple instances of Autophone's server on a single machine where port conflicts would not result in incrementing the port seed.

In findOpenPort the raise should be nested under the if seed condition. The way it reads now, findOpenPort raising an exception the first time it hits a problem such as an address in use.

                 except:
                     if seed > maxportnum:
                         print "Automation Error: Could not find open port after checking 5000 ports"
-                    raise
+                        raise
                 seed += 1
Attachment #710657 - Flags: review?(jmaher)
Comment on attachment 710657 [details] [diff] [review]
patch

Review of attachment 710657 [details] [diff] [review]:
-----------------------------------------------------------------

good find!
Attachment #710657 - Flags: review?(jmaher) → review+

Comment 2

6 years ago
pushed: https://github.com/mozilla/mozbase/commit/e7e5e8a602c386d99407eb2c0c1dd51ccab23fba 

Thanks for the patch, Bob!
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.