Code Duplication    Length = 11-12 lines in 2 locations

opcua/ua/uaprotocol_auto.py 2 locations

@@ 1197-1208 (lines=12) @@
1194
1195
    def to_binary(self):
1196
        packet = []
1197
        packet.append(uabin.Primitives.String.pack(self.ApplicationUri))
1198
        packet.append(uabin.Primitives.String.pack(self.ProductUri))
1199
        packet.append(self.ApplicationName.to_binary())
1200
        packet.append(uabin.Primitives.UInt32.pack(self.ApplicationType.value))
1201
        packet.append(uabin.Primitives.String.pack(self.GatewayServerUri))
1202
        packet.append(uabin.Primitives.String.pack(self.DiscoveryProfileUri))
1203
        packet.append(uabin.Primitives.Int32.pack(len(self.DiscoveryUrls)))
1204
        for fieldname in self.DiscoveryUrls:
1205
            packet.append(uabin.Primitives.String.pack(fieldname))
1206
        return b''.join(packet)
1207
1208
    @staticmethod
1209
    def from_binary(data):
1210
        return ApplicationDescription(data)
1211
@@ 7437-7447 (lines=11) @@
7434
    '''
7435
    :ivar OrganizationUri:
7436
    :vartype OrganizationUri: String
7437
    :ivar ProfileId:
7438
    :vartype ProfileId: String
7439
    :ivar ComplianceTool:
7440
    :vartype ComplianceTool: String
7441
    :ivar ComplianceDate:
7442
    :vartype ComplianceDate: DateTime
7443
    :ivar ComplianceLevel:
7444
    :vartype ComplianceLevel: ComplianceLevel
7445
    :ivar UnsupportedUnitIds:
7446
    :vartype UnsupportedUnitIds: String
7447
    '''
7448
7449
    ua_types = {
7450
        'OrganizationUri': 'String',