Incorrect regexp in get_android_version

Issue #4 resolved
Former user created an issue

Hi,

I just pulled the plugin and got the following error when creating the project:

AttributeError: 'NoneType' object has no attribute 'group'

The command "android list | grep -A 1 "android-"" returns the following on my PC:

[my@pc ~]$ android list | grep -A 1 "android-" id: 1 or "android-14" Name: Android 4.0 -- id: 2 or "android-15" Name: Android 4.0.3 -- id: 5 or "android-16" Name: Android 4.1

So, I had to change the regexp on line 70 of Andrew.py from: m2 = re.search('(android-[0-9] + )', row2)

To: m2 = re.search('(android-[0-9]+)', row2)

Comments (3)

  1. Danyil Velichko

    Sorry, did now knew that the formatting is gone once you submit the text.

    The command "android list | grep -A 1 "android-"" returns the following on my PC:

    [my@pc ~]$ android list | grep -A 1 "android-"
    id: 1 or "android-14"
         Name: Android 4.0
    --
    id: 2 or "android-15"
         Name: Android 4.0.3
    --
    id: 5 or "android-16"
         Name: Android 4.1
    

    So I had to change the line 70 from

    m2 = re.search('(android-[0-9] + )', row2)
    

    To:

    m2 = re.search('(android-[0-9]+)', row2)
    
  2. Sergi Juanola repo owner

    Hi, thanks for writing the issue!

    I solved this problem (and probably some more directly related to it).

  3. Log in to comment