Subversion Repositories SmartDukaan

Rev

Rev 3453 | Rev 4198 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3453 Rev 4039
Line 25... Line 25...
25
                      'Spice', 'Nokia', 'HTC', 'Samsung', 'LG', 'Dell', 'Karbonn', 'Lava']
25
                      'Spice', 'Nokia', 'HTC', 'Samsung', 'LG', 'Dell', 'Karbonn', 'Lava']
26
        
26
        
27
        self.brands.append('Blackberry') #To resolve issue of 'BlackBerry' and 'Blackberry'
27
        self.brands.append('Blackberry') #To resolve issue of 'BlackBerry' and 'Blackberry'
28
    
28
    
29
    def extract(self, full_name):
29
    def extract(self, full_name):
-
 
30
        full_name = full_name.strip()
30
        
31
        
31
        for brand in self.brands:
32
        for brand in self.brands:
32
            if full_name.startswith(brand):  return (brand, full_name.replace(brand, '').strip())
33
            if full_name.startswith(brand):  return (brand, full_name.replace(brand, '').strip())
33
        
34
        
34
        return ("", full_name)
35
        return ("", full_name)